<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="jakarta.faces.core"
                xmlns:ui="jakarta.faces.facelets" xmlns:p="http://primefaces.org/ui"
                template="/template_pop.xhtml"
                xmlns:h="jakarta.faces.html">
    <ui:define name="content">
        <title>#{sysAreaMBean.editObj.id ==null ? sms['button.new'] : sms['button.edit']}#{sms['sys.parameter.title']}</title>
        <p:inputText value="#{sysAreaMBean.editObj.id}"/>
          <!--<p:growl id="growl" showDetail="true" />-->
      <div class="field grid">
            <p:outputLabel for="parent" class="col-fixed" style="width:100px"
                           dir="RTL">Parent</p:outputLabel>
            <div class="col">
                <p:inputText id="parent" value="#{sysAreaMBean.editObj.parent.name}" required="true" >


                </p:inputText>
                <p:message for="@previous" />
            </div>

        </div>
      <div class="field grid">
            <p:outputLabel for="name" class="col-fixed" style="width:100px"
                           dir="RTL">#{sms['sys.parameter.name']}</p:outputLabel>
            <div class="col">
                <p:inputText id="name" value="#{sysAreaMBean.editObj.name}" required="true" >

                    <f:validateLength minimum="2" maximum="50"/>
                    <p:clientValidator event="keyup"/>

                </p:inputText>
                <p:message for="@previous" />
            </div>

        </div>
       

        <br/>

        <div class="flex">
            <p:commandButton value="#{sms['button.submit']}" update="@form" type="submit" validateClient="true" ajax="true"
                             action="#{sysAreaMBean.save}"
                             class="flex-2 border-round mx-4" >
             
            </p:commandButton>
            <p:commandButton value="#{sms['button.cancel']}"  
                             action="#{sysAreaMBean.closeDialog()}"
                             class="flex-2 border-round mx-4" rendered="#{sysAreaMBean.editObj.id!=null}" >
             
            </p:commandButton>


        </div>


    </ui:define></ui:composition>